home *** CD-ROM | disk | FTP | other *** search
/ Champak 122 / Vol 122.iso / games / coloured.swf / scripts / DefineButton2_18 / BUTTONCONDACTION on(release).as
Encoding:
Text File  |  2011-01-06  |  1.2 KB  |  45 lines

  1. on(release){
  2.    if(Number(eval("/:gameover")) != Number(true) and Number(eval("/:dealfindcommon")) != Number(true))
  3.    {
  4.       set("/:dealfindcommon",true);
  5.       set("/:shootballcolor",getProperty("/arrow/nextball", _currentframe));
  6.       tellTarget("/arrow/nextball")
  7.       {
  8.          gotoAndStop("blank");
  9.       }
  10.       set("/:hit_ball_name",_name);
  11.       set("/:hit_ball_index",eval("/:hit_ball_name").substr(5,2));
  12.       set("/:hit_ball_name","/" add eval("/:hit_ball_name"));
  13.       if(Number(eval("/:hit_ball_index")) < 25)
  14.       {
  15.          tellTarget("/arrow/shootball")
  16.          {
  17.             gotoAndStop("circle3");
  18.             play();
  19.          }
  20.       }
  21.       else if(Number(eval("/:hit_ball_index")) >= 25 and Number(eval("/:hit_ball_index")) < 44)
  22.       {
  23.          tellTarget("/arrow/shootball")
  24.          {
  25.             gotoAndStop("circle2");
  26.             play();
  27.          }
  28.       }
  29.       else if(Number(eval("/:hit_ball_index")) >= 44)
  30.       {
  31.          tellTarget("/arrow/shootball")
  32.          {
  33.             gotoAndStop("circle1");
  34.             play();
  35.          }
  36.       }
  37.       tellTarget("/effect")
  38.       {
  39.          gotoAndStop("shoot");
  40.          play();
  41.       }
  42.       stopDrag();
  43.    }
  44. }
  45.